import Ember from 'ember';
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import config from './config/environment';

Ember.MODEL_FACTORY_INJECTIONS = true;

var App = Ember.Application.extend({
  modulePrefix: config.modulePrefix,
  podModulePrefix: config.podModulePrefix,
  Resolver: Resolver
});

loadInitializers(App, config.modulePrefix);

App.PaginatonBaseComponent = Ember.Component.extend({  
  tagName: 'button',
  classNames: 'btn btn-default'.w(),
  attributeBindings: ['disabled'],
  // the enabled property will easily toggle the disabled attribute for the element
  // in case there's no more items to iterate
  enabled: true,
  disabled: Ember.computed.not('enabled'),
  action: null,
  click: function(){
    this.sendAction();
  }
});

Ember.LinkView.reopen({
  attributeBindings : ['aria-label']
});

export default App;